﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<hercules.Models.ProdutoModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Editar Produto
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<center>

<h2>Editar Produto</h2>

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset style="width: 700px;">
        <legend>Produto</legend>

        <%: Html.HiddenFor(model => model.IdProduto) %>

        <table>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.CodigoBarra) %> <br/>
                    <%: Html.EditorFor(model => model.CodigoBarra) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.CodigoBarra) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.NaturezaCFOP) %> <br/>
                    <%: Html.EditorFor(model => model.NaturezaCFOP) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.NaturezaCFOP) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.Nome) %> <br/>
                    <%: Html.EditorFor(model => model.Nome) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.Nome) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.Apelido) %> <br/>
                    <%: Html.EditorFor(model => model.Apelido) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.Apelido) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.PrecoNota) %> <br/>
                    <%: Html.EditorFor(model => model.PrecoNota) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.PrecoNota) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.PrecoReal) %> <br/>
                    <%: Html.EditorFor(model => model.PrecoReal) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.PrecoReal) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.Ncm) %> <br/> 
                    <%: Html.EditorFor(model => model.Ncm) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.Ncm) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.Ipi) %> <br/> 
                    <%: Html.EditorFor(model => model.Ipi) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.Ipi) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.Icms) %> <br/>
                    <%: Html.EditorFor(model => model.Icms) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.Icms) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.Unidade) %> <br/>
                    <%: Html.EditorFor(model => model.Unidade) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.Unidade) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.PrecoVenda) %> <br/>
                    <%: Html.EditorFor(model => model.PrecoVenda) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.PrecoVenda) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.DescontoMaximo) %> <br/>
                    <%: Html.EditorFor(model => model.DescontoMaximo) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.DescontoMaximo) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.DataVencimento) %> <br/>
                    <%: Html.EditorFor(model => model.DataVencimento) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.DataVencimento) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.Lote) %>
                    <%: Html.EditorFor(model => model.Lote) %>
                    <%: Html.ValidationMessageFor(model => model.Lote) %>
                </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Salvar" />
        </p>
    </fieldset>
<% } %>

<div>
    <%: Html.ActionLink("Voltar", "Index") %>
</div>

</center>

</asp:Content>
